<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    fetch("http://localhost:8080/getlist").then((res)=>{
        return res.json()
    }).then(res=>{
        console.log(res)
        var userList = res
        var users = document.getElementById('users')
        for(var i = 1;i<userList.length;i++){
            var liNode = document.createElement('li')
            liNode.innerHTML = '<span>'+userList[i]["username"]+'</span>'+
            '&nbsp;&nbsp;<span>'+userList[i]["age"]+'</span>'+
            '&nbsp;&nbsp;<span>'+userList[i]["choose"]+'</span>'+
            "<a href='/del?deluser='"+userList[i]["username"]+"'></a>"
            users.appendChildren(liNode)
        }
    })
</script>
</html>